﻿using System.Windows.Forms;
using System.Security;
using System;

public class SettingsForm : Form
{
    private TextBox txtLogin;
    private Button btnOkay;
    private TextBox txtPassword;
    private Button btnCancel;

    public SettingsForm()
    {
        InitializeComponent(); 
    }

    public SecureString Password
    {
        get
        {
            SecureString result = new SecureString();
            foreach (Char c in txtPassword.Text)
            {
                result.AppendChar(c);
            }

            return result;
        }
    }

    public string Login
    {
        get
        {
            return txtLogin.Text;
        }
    }


    private void InitializeComponent()
    {
        System.Windows.Forms.Label label1;
        System.Windows.Forms.Label label2;
        this.txtLogin = new System.Windows.Forms.TextBox();
        this.btnOkay = new System.Windows.Forms.Button();
        this.btnCancel = new System.Windows.Forms.Button();
        this.txtPassword = new System.Windows.Forms.TextBox();
        label1 = new System.Windows.Forms.Label();
        label2 = new System.Windows.Forms.Label();
        this.SuspendLayout();
        // 
        // label1
        // 
        label1.AutoSize = true;
        label1.Location = new System.Drawing.Point(12, 9);
        label1.Name = "label1";
        label1.Size = new System.Drawing.Size(63, 13);
        label1.TabIndex = 0;
        label1.Text = "Email/Login";
        // 
        // label2
        // 
        label2.AutoSize = true;
        label2.Location = new System.Drawing.Point(12, 38);
        label2.Name = "label2";
        label2.Size = new System.Drawing.Size(53, 13);
        label2.TabIndex = 1;
        label2.Text = "Password";
        // 
        // txtLogin
        // 
        this.txtLogin.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                    | System.Windows.Forms.AnchorStyles.Right)));
        this.txtLogin.Location = new System.Drawing.Point(82, 9);
        this.txtLogin.Name = "txtLogin";
        this.txtLogin.Size = new System.Drawing.Size(198, 20);
        this.txtLogin.TabIndex = 2;
        // 
        // btnOkay
        // 
        this.btnOkay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
        this.btnOkay.DialogResult = System.Windows.Forms.DialogResult.OK;
        this.btnOkay.Location = new System.Drawing.Point(124, 65);
        this.btnOkay.Name = "btnOkay";
        this.btnOkay.Size = new System.Drawing.Size(75, 23);
        this.btnOkay.TabIndex = 4;
        this.btnOkay.Text = "Okay";
        this.btnOkay.UseVisualStyleBackColor = true;
        // 
        // btnCancel
        // 
        this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
        this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
        this.btnCancel.Location = new System.Drawing.Point(205, 65);
        this.btnCancel.Name = "btnCancel";
        this.btnCancel.Size = new System.Drawing.Size(75, 23);
        this.btnCancel.TabIndex = 5;
        this.btnCancel.Text = "Cancel";
        this.btnCancel.UseVisualStyleBackColor = true;
        // 
        // txtPassword
        // 
        this.txtPassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                    | System.Windows.Forms.AnchorStyles.Right)));
        this.txtPassword.Location = new System.Drawing.Point(82, 35);
        this.txtPassword.Name = "txtPassword";
        this.txtPassword.PasswordChar = '*';
        this.txtPassword.Size = new System.Drawing.Size(198, 20);
        this.txtPassword.TabIndex = 3;
        // 
        // SettingsForm
        // 
        this.AcceptButton = this.btnOkay;
        this.CancelButton = this.btnCancel;
        this.ClientSize = new System.Drawing.Size(292, 100);
        this.Controls.Add(this.btnCancel);
        this.Controls.Add(this.btnOkay);
        this.Controls.Add(this.txtPassword);
        this.Controls.Add(this.txtLogin);
        this.Controls.Add(label2);
        this.Controls.Add(label1);
        this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
        this.MaximizeBox = false;
        this.MinimizeBox = false;
        this.Name = "SettingsForm";
        this.ShowIcon = false;
        this.ShowInTaskbar = false;
        this.Text = "Settings";
        this.ResumeLayout(false);
        this.PerformLayout();
    }
}